package com.group4.edu.mapper;

import com.group4.edu.entity.Subject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 课程科目 Mapper 接口
 * </p>
 *
 * @author cloud
 * @since 2022-03-10
 */
@Mapper
public interface SubjectMapper extends BaseMapper<Subject> {
    @Select("SELECT id,title FROM edu_subject WHERE parent_id = 0")
    List<Subject> findParSubject();

    @Select("SELECT id,title FROM edu_subject WHERE parent_id != 0")
    List<Subject> findOtherSubject();
}
